Skip to main content
POST
/
v2
/
onramp
/
quote
Python (SDK)
from compass_api_sdk import CompassAPI


with CompassAPI(
    api_key_auth="<YOUR_API_KEY_HERE>",
) as compass_api:

    res = compass_api.onramp.onramp_quote(fiat_amount="<value>", destination_address="<value>", fiat_currency="USD")

    # Handle response
    print(res)
{
  "fiat_amount": "<string>",
  "fiat_currency": "<string>",
  "output_amount": "<string>",
  "exchange_rate": "<string>",
  "fees": {
    "provider_fee": "<string>",
    "network_fee": "<string>",
    "business_fees": "0"
  },
  "output_asset": "USDC",
  "output_chain": "ethereum",
  "min_amount": "20",
  "max_amount": "10000",
  "expires_at": "<string>"
}

Authorizations

x-api-key
string
header
required

Your Compass API Key. Get your key here.

Body

application/json

An indicative fiat -> USDC-on-Ethereum quote request.

The output asset and chain are fixed to USDC on Ethereum and are not user-supplied — this product group delivers only USDC to the user's own wallet (non-custodial).

fiat_amount
string
required

Amount of fiat to spend, as a decimal string (e.g. 100).

Example:

"100"

destination_address
string
required

The wallet that will receive the USDC on Ethereum. Funds are delivered here directly — Compass never holds them.

Example:

"0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B"

fiat_currency
string
default:USD

ISO-4217 fiat currency code. Defaults to USD.

Example:

"USD"

Response

Successful Response

An indicative fiat -> USDC-on-Ethereum quote.

fiat_amount
string
required

Fiat amount to spend.

Example:

"100"

fiat_currency
string
required

ISO-4217 fiat currency code.

Example:

"USD"

output_amount
string
required

Estimated USDC delivered, human-readable (6-decimal token).

Example:

"98.50"

exchange_rate
string
required

USDC received per unit of fiat.

Example:

"0.985"

fees
OnrampFees · object
required

Fee breakdown.

output_asset
string
default:USDC

Delivered asset. Always USDC for this on-ramp.

Allowed value: "USDC"
output_chain
string
default:ethereum

Delivery chain. Always Ethereum for this on-ramp.

Allowed value: "ethereum"
min_amount
string | null

Minimum fiat amount accepted, if advertised by the provider.

Example:

"20"

max_amount
string | null

Maximum fiat amount accepted, if advertised by the provider.

Example:

"10000"

expires_at
string | null

ISO-8601 timestamp after which this quote is stale, if any.